package com.cosc716.restaurant.system;

import com.cosc716.restaurant.domain.Menu;
import com.cosc716.restaurant.domain.Tabs;
import com.cosc716.restaurant.domain.collections.OrderQueue;
import com.cosc716.restaurant.domain.collections.Tables;
import com.cosc716.restaurant.domain.collections.WaitingQueue;

public class Aggregator {
	
	/* The singleton instance of the Aggregator */ 
	private static Aggregator aggregator = null;
	
	private Menu menu;
	private OrderQueue orders;
	private Tabs tabs;
	private WaitingQueue waitingQueue;
	private Tables tables;

	
	private Aggregator() {
		menu = new Menu();
		orders = new OrderQueue();
		tabs = new Tabs();
		waitingQueue = new WaitingQueue();
		tables = new Tables();
	}
	
	public static Aggregator getInstance() {
		if(aggregator == null) {
			aggregator = new Aggregator();
		}
		
		return aggregator;
 	}
	
	public Menu getMenu() {
		return menu;
	}
	
//	public void addMenuItem(MenuItem menuItem) {
//		menu.additem(menuItem);
//	}

	public OrderQueue getOrders() {
		return orders;
	}
	
//	public void addOrderItem(OrderItem orderItem) {
//		orders.addOrderItem(orderItem);
//	}

	public Tabs getTabs() {
		return tabs;
	}
	
//	public void addTab(Tab tab) {
//		tabs.addTab(tab);
//	}
	
	public WaitingQueue getWaitingQueue() {
		return waitingQueue;
	}
	
	public Tables getTables() {
		return tables;
	}

}
